﻿using UnityEngine;
using System.Collections;

public class player_anim : MonoBehaviour {
	

	// Update is called once per frame
	void Update () {

		// Hahmon liikkuminen
		if(Input.GetKey("space"))
			this.GetComponent<Animator>().Play("player_jump");
		else if(Input.GetKey("left") || Input.GetKey("right"))
			this.GetComponent<Animator>().Play("player_run");
		else
			this.GetComponent<Animator>().Play("player_stand");

	
	}
}



